<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>libspotify: Inbox subsystem</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">libspotify
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Inbox subsystem</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ga5084d6ab753294730402a0c43b82e60c"><td class="memItemLeft" align="right" valign="top">typedef void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__inbox.html#ga5084d6ab753294730402a0c43b82e60c">inboxpost_complete_cb</a> (<a class="el" href="group__types.html#gaec0f2e5098cebc05ce56adfc9b346510">sp_inbox</a> *result, void *userdata)</td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gaee29e747ca10b36597d91689ae074aa2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__types.html#gaec0f2e5098cebc05ce56adfc9b346510">sp_inbox</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__inbox.html#gaee29e747ca10b36597d91689ae074aa2">sp_inbox_post_tracks</a> (<a class="el" href="group__types.html#ga70dd19c6f824cf6a159575aa4c128b53">sp_session</a> *session, const char *user, <a class="el" href="group__types.html#ga47bbd2262f0c8b5d7147af7d62198e48">sp_track</a> *const *tracks, int num_tracks, const char *message, <a class="el" href="group__inbox.html#ga5084d6ab753294730402a0c43b82e60c">inboxpost_complete_cb</a> *callback, void *userdata)</td></tr>
<tr class="memitem:gaa452e9fe1fa7c9e2c780d28ce2ed63c5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__error.html#gafd27986ce4cd9eeaeca8adda83c9eb6b">sp_error</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__inbox.html#gaa452e9fe1fa7c9e2c780d28ce2ed63c5">sp_inbox_error</a> (<a class="el" href="group__types.html#gaec0f2e5098cebc05ce56adfc9b346510">sp_inbox</a> *inbox)</td></tr>
<tr class="memitem:gad348abe24d56ae9921ce9992fd479d0e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__inbox.html#gad348abe24d56ae9921ce9992fd479d0e">sp_inbox_add_ref</a> (<a class="el" href="group__types.html#gaec0f2e5098cebc05ce56adfc9b346510">sp_inbox</a> *inbox)</td></tr>
<tr class="memitem:gab56c65514a6eb88d4a28b1792b3a9845"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__inbox.html#gab56c65514a6eb88d4a28b1792b3a9845">sp_inbox_release</a> (<a class="el" href="group__types.html#gaec0f2e5098cebc05ce56adfc9b346510">sp_inbox</a> *inbox)</td></tr>
</table>
<hr/><h2>Typedef Documentation</h2>
<a class="anchor" id="ga5084d6ab753294730402a0c43b82e60c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void <a class="el" href="group__inbox.html#ga5084d6ab753294730402a0c43b82e60c">inboxpost_complete_cb</a>(<a class="el" href="group__types.html#gaec0f2e5098cebc05ce56adfc9b346510">sp_inbox</a> *result, void *userdata)</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The type of a callback used in sp_inbox_post()</p>
<p>When this callback is called, the <a class="el" href="group__track.html#ga8b69cf193679c7e00031ae43e61c6a54">sp_track_is_loaded()</a>, <a class="el" href="group__album.html#ga46fbfa98be12c2f4067d5e679552cfb9">sp_album_is_loaded()</a>, and <a class="el" href="group__artist.html#gafc98f5093184a7ac7ce608302b0971ea">sp_artist_is_loaded()</a> functions will return non-zero for the objects contained in the search result.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">result</td><td>The same pointer returned by <a class="el" href="group__search.html#ga2f64dfbcc1313e7d5179998cb28208d4">sp_search_create()</a> </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">userdata</td><td>The opaque pointer given to <a class="el" href="group__search.html#ga2f64dfbcc1313e7d5179998cb28208d4">sp_search_create()</a> </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="gad348abe24d56ae9921ce9992fd479d0e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="group__inbox.html#gad348abe24d56ae9921ce9992fd479d0e">sp_inbox_add_ref</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#gaec0f2e5098cebc05ce56adfc9b346510">sp_inbox</a> *&#160;</td>
          <td class="paramname"><em>inbox</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Increase the reference count of a inbox result</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">inbox</td><td>The inbox result object </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gaa452e9fe1fa7c9e2c780d28ce2ed63c5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__error.html#gafd27986ce4cd9eeaeca8adda83c9eb6b">sp_error</a> <a class="el" href="group__inbox.html#gaa452e9fe1fa7c9e2c780d28ce2ed63c5">sp_inbox_error</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#gaec0f2e5098cebc05ce56adfc9b346510">sp_inbox</a> *&#160;</td>
          <td class="paramname"><em>inbox</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Check if inbox operation returned an error code.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">inbox</td><td>Inbox object</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>One of the following errors, from <a class="el" href="group__error.html#ga83154178d3a32668658734d2facfa22b">sp_error</a> SP_ERROR_OK SP_ERROR_OTHER_TRANSIENT SP_ERROR_PERMISSION_DENIED SP_ERROR_INVALID_INDATA SP_ERROR_INBOX_IS_FULL SP_ERROR_NO_SUCH_USER SP_ERROR_OTHER_PERMANENT </dd></dl>

</div>
</div>
<a class="anchor" id="gaee29e747ca10b36597d91689ae074aa2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__types.html#gaec0f2e5098cebc05ce56adfc9b346510">sp_inbox</a>* <a class="el" href="group__inbox.html#gaee29e747ca10b36597d91689ae074aa2">sp_inbox_post_tracks</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#ga70dd19c6f824cf6a159575aa4c128b53">sp_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>user</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#ga47bbd2262f0c8b5d7147af7d62198e48">sp_track</a> *const *&#160;</td>
          <td class="paramname"><em>tracks</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>num_tracks</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>message</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__inbox.html#ga5084d6ab753294730402a0c43b82e60c">inboxpost_complete_cb</a> *&#160;</td>
          <td class="paramname"><em>callback</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>userdata</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Add to inbox</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">session</td><td>Session object </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">user</td><td>Canonical username of recipient </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">tracks</td><td>Array of tracks to post </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">num_tracks</td><td>Number of tracks in <code>tracks</code> </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">message</td><td>Message to attach to tracks. UTF-8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">callback</td><td>Callback to be invoked when the request has completed </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">userdata</td><td>Userdata passed to callback</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>sp_inbox object if the request has been sent, NULL if request failed to initialize </dd></dl>

</div>
</div>
<a class="anchor" id="gab56c65514a6eb88d4a28b1792b3a9845"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="group__inbox.html#gab56c65514a6eb88d4a28b1792b3a9845">sp_inbox_release</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#gaec0f2e5098cebc05ce56adfc9b346510">sp_inbox</a> *&#160;</td>
          <td class="paramname"><em>inbox</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Decrease the reference count of a inbox result</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">inbox</td><td>The inbox result object </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
<hr size="1"><address style="text-align: right;"><small>
Generated on Wed Mar 28 2012 18:22:23.<br>
Copyright &copy; 2006&ndash;2012 Spotify Ltd</small></address>
</body>
</html>
